const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  // 修改端口的配置
  devServer: {
    host: 'localhost', // 主机地址
    port: '5500', // 端口
    proxy: {
      '/api': {
        target: 'https://jsonplaceholder.typicode.com/', // 真实地址
        changeOrigin: true,
        pathRewrite: {
          '/api': ''
        }
      }
    }
  },
  css: {
    loaderOptions: {
      sass: {
        // 全局sass变量	
        //sass-loader 新版本
        additionalData: `@import "~@/assets/scss/_variable.scss";`
      }
    }
  },
})
